<?php
namespace app\apijson\core;

use app\apijson\parser\Parser;
use app\apijson\query\QueryBuilder;

class ApiJsonService
{
    public function handle(array $json, string $method = 'get')
    {
        $parser = new Parser();
        $parsed = $parser->parse($json);
        $builder = new QueryBuilder();
        return $builder->build($parsed, $method);
    }
} 